package com.jeeplus.cms.config.freemarker.function;

import com.jeeplus.cms.util.CmsUtils;
import freemarker.template.TemplateMethodModelEx;
import freemarker.template.TemplateModelException;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author WuXilin
 */
@Component
public class GetKeywordList implements TemplateMethodModelEx {

    @Override
    public Object exec(List list) throws TemplateModelException {
        String siteId = String.valueOf(list.get(0));
        String columnId = String.valueOf(list.get(1));
        return CmsUtils.getKeywordList(siteId, columnId);
    }
}
